package com.ps.feign;

import com.ps.feign.impl.QuestionFeignImpl;
import com.ps.property.PageBean;
import com.ps.property.QuestionVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author gt
 * @类说明：
 * @date 2020/10/22 21:53
 */
@FeignClient(value = "question-provide",fallback = QuestionFeignImpl.class)
public interface QuestionFeign {
    @PostMapping("/questionAdd-provide")
    void questionAdd(QuestionVo questionVo);

    @GetMapping("/questionQuery-provide")
    PageBean<QuestionVo> questionQuery(@RequestParam("currentPage") int currentPage, @RequestParam("pageSize") int pageSize, @RequestParam("questionTitle") String questionTitle);

    @PostMapping("/questionUpdate-provide")
    void questionUpdate(QuestionVo questionVo);

    @GetMapping("/questionQueryById-provide/{id}")
    QuestionVo questionQueryById(@PathVariable int id);
}
